home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
compress
/
lzssli
/
lzsstest.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-12-17
|
2KB
|
58 lines
Program LZSSTEST;
{$D LZSSTEST.EXE - ⌐ Copyright 1991,92 Robert Salesas, All Rights Reserved.}
{$I-}
{$M 6000,4412
{$C Demandload Discardable}
{
********************************************************************
* LZSS Compression/Decompression Tester *
********************************************************************
* Copyright 1991-92 Robert Salesas, All Rights Reserved *
********************************************************************
* Version: 1.00 Author: Robert Salesas *
* Date: 06-Dec-1991 Changes: Original *
* *
********************************************************************
}
Uses WinProcs, WinTypes, WinDOS, Strings;
Function LZSSPackFile(SrcFile, DstFile : PChar) : Integer; Far;
External 'EDILZSSA' Index 100;
Function LZSSUnPackFile(SrcFile, DstFile : PChar) : Integer; Far;
External 'EDILZSSA' Index 200;
Var
InFile,
OutFile : Array [0..255] Of Char;
Switch : Array [0..0] Of Char;
Begin
If (ParamCount < 3) Then
MessageBox(0, 'USAGE: LZSSTEST e|d infile outfile', 'EDI LZSS TEST',
mb_IconInformation Or mb_Ok)
Else
Begin
StrUpper(StrPCopy(Switch, ParamStr(1)));
StrPCopy(Infile, ParamStr(2));
StrPCopy(Outfile, ParamStr(3));
If (Switch[0] = 'E') Then
DOSError := LZSSPackFile(Infile, Outfile)
Else If (Switch[0] = 'D') Then
DOSError := LZSSUnPackFile(Infile, Outfile);
If (DOSError <> 0) Then
MessageBox(0, 'Error #--, unable to complete operation.', 'EDI LZSS TEST',
mb_IconStop Or mb_Ok)
Else
MessageBox(0, 'All done.', 'LZSSTEST', mb_IconExclamation Or mb_Ok);
End;
End. {LZSSTEST}